import { isEqual } from "lodash"

export const getPlaneString = (arr: any) => {
	if(isEqual(arr, [[0, 0, 0], [0, 0, 1]])) {
		return 'XOY'
	}

	if(isEqual(arr, [[0, 0, 0], [1, 0, 0]])) {
		return 'YOZ'
	}

	if(isEqual(arr, [[0, 0, 0], [0, 1, 0]])) {
		return 'XOZ'
	}
	return arr
}

export const getPlaneArray = (plane: string) => {
	if(plane === 'XOY') {
		return [[0, 0, 0], [0, 0, 1]]
	}

	if(plane === 'YOZ') {
		return [[0, 0, 0], [1, 0, 0]]
	}

	if(plane === 'XOZ') {
		return [[0, 0, 0], [0, 1, 0]]
	}
	return plane
}